﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web.UI;

namespace CsExample45 {
    public partial class Default : Page {
        protected void Button1_Click(object sender, EventArgs e) {
            Profile.Counter++;
        }

        protected void Page_PreRender(object sender, EventArgs e) {
            Label1.Text = string.Format("You clicked the button {0} times.", Profile.Counter);
        }

        public static MyWebProfile Profile {
            //get { return new MyWebProfile(System.Web.HttpContext.Current.Profile); }
            get { return MyWebProfile.Current; }
        }
    }
}
